<?php
	Class Image_model extends CI_Model{
		public function __construct(){
			parent::__construct();
		}
		public function displayAllImg(){
			$query = $this->db->get('image');
			if($query->num_rows()>0){
				return $query->result();
			}
		}
		public function uploadThisImg($data){
			$params = array(
				'filename'=>$data['file_name'],
				'fileloc'=>$data['file_path']
			);
			$query = $this->db->insert('image',$params);
			return $this->db->affected_rows();
		}
	}
?>